package org.tnaggs.project.manager;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.tnaggs.project.model.Location;
import org.tnaggs.project.repository.LocationRepository;

public class LocationManager {

	@Autowired
	private LocationRepository localRepo;
	
	public List<Location> getAllLocations() {
		return localRepo.findAll();
	}

	public void createLocation(Location local) {
		localRepo.insert(local);
	}
	
	public Location getLocation(int localID) {
		return localRepo.findByID(localID);
	}	
	
}
